<template>
    <h1>列表</h1>
    <ul>
        
        <li v-for="item in blogList" :key="item.id">
            <!-- 路由传参 -->
            <router-link :to=" '/blog/' + item.id">
                {{item.title}}
            </router-link>
        </li>
        
    </ul>
</template>

<script>
    export default{
		created() {
			console.log(localStorage.getItem("name"))
		},
        data(){
            return{
                blogList:[
                    {id:1,title:"html+css"},
                    {id:2,title:"javascript"},
                    {id:3,title:"node"},
                    {id:4,title:"ajax"},
                    {id:5,title:"vue"}
                ]
            }
        }
    }
</script>